import React, { useState, createContext } from "react";

// import CountClass from "./10_useLayoutEffect/01_useEffect的count修改";
// import CountClass from "./11_自定义Hooks/01_认识自定义Hooks";
// import CountClass from "./11_自定义Hooks/02_自定义Hook练习-Context共享";
// import CountClass from "./11_自定义Hooks/03_自定义Hook练习-获取滚动位置";
import CountClass from "./11_自定义Hooks/04_自定义Hook练习-localStorage存储";

export const UserContext = createContext();
export const ThemeContext = createContext();
export const TokenContext = createContext();

export default function App() {
  // const [Show, setShow] = useState(true);

  return (
    <div>
      {/* {Show && <CountClass></CountClass>}
      <button onClick={(e) => setShow(!Show)}>切换</button> */}
      {/* <UserContext.Provider value={{ name: "why", age: 18 }}>
        <ThemeContext.Provider value={{ fontSize: "30px", color: "red" }}>
          <CountClass></CountClass>
        </ThemeContext.Provider>
      </UserContext.Provider> */}

      {/* 自定义Hook */}
      {/* <UserContext.Provider value={{ name: "why", age: 18 }}>
        <TokenContext.Provider value="aaa">
          <CountClass></CountClass>
        </TokenContext.Provider>
      </UserContext.Provider> */}
      <CountClass></CountClass>
    </div>
  );
}
